
*--------------------------------------------------------------------------
*--------------------------------------------------------------------------
*
* Article:		Bombs and banners: 
*				The use of nonviolent tactics 
*				by armed groups
*				
* Authors: 		Solveig Hillesund & Helge Holtermann
* Date:			June 2024
*
* Software:		Stata 18
*
*--------------------------------------------------------------------------
*--------------------------------------------------------------------------



*--------------------------------------------------------------------------	
*	Contents
*--------------------------------------------------------------------------

*	Setup
*	Variables
*	Log file
*	1 Descriptive statistics
*	2 Main regression models
*	3 Diagnostics 
*	4 Robustness
*	5 Causality
*	6 Additional analyses: subsamples
*	TeX tables

 // Note: All numbered sections are bookmarked
	

	
	
	
*--------------------------------------------------------------------------
*	Setup
*--------------------------------------------------------------------------


*** INSTRUCTIONS: How to replicate the analyses

	// In order to replicate the analyses from the article and appendix, 
	// add the path to the folder where you have stored the replication 
	// dataset (under the heading  'Project folder path' below this text) 
	// and run this do-file (press ctrl+D). 
	
	// All figures and coefficient plots will appear directly in the 
	// project folder.
	
	// All tables will be reported in a text file (log) called 'tables'
	// in the project folder. Note that for some models, the coefficients 
	// are ordered differently in the log file than in the fully formatted 
	// tables in the online appendix. 
	// For an alternative way to view the tables, see TeX tables section.
	

	
*** Project folder path (working directory)

cd "path_to_project_folder" // paste path here before running code


*** Open dataset 

use data_hillesund_holtermann, clear 


*** Panel set-up

xtset dyadid year


*** Drop stored estimates

estimates drop _all





*--------------------------------------------------------------------------	
*	Variables
*--------------------------------------------------------------------------	

	// This section provides an overview of the variables used in the analysis.
	// For more detailed descriptions, including how each variable was 
	// constructed and from what data sources, see the file 
	// 'variables_and_sources' in the replication folder.
	

*** Variable overview and labels

* Clustering and panel variables
lab var dyadiducdp "Dyad id UCDP" // often used in short form in the below code: dyadid
lab var year "Year"
* Dependent variable
lab var nv4 "Nonviolent tactics"
lab var protestnew "Protest" 
lab var econcnew "Economic noncooperation"
lab var socncnew "Social noncooperation"
lab var nvintnew "Nonviolent intervention"
lab var political_nocoop "Political noncooperation"
* Main predictors
lab var l1lnrebmingovfat "Ln Rebel minus government fatalities (t-1)"
lab var l1rebvsgovfat_8cat "Battelfield success (t-1, categorical reb-min-gov-fat)"
lab var l1rebvsgovfat20_3cat "Battelfield success (t-1, binary, reb-min-gov fat below 20)"
* Controls
lab var l1lnrebfore "Ln Rebel forces (t-1)"
lab var l1lngovtroops "Ln Government forces (t-1)"
lab var l1lncombatevent "Ln Combat events (t-1)"
lab var yrs_nv4 "Years since nonviolence" // used with cubic polinomial
lab var yrs_nv4_sq "Years since nonviolence, squared"
lab var yrs_nv4_cb "Years since nonviolence, cubed"
* Subsamples
lab var selfdet "Self-determination conflict"
lab var l1wingactive "Active civilian wing (t-1)"
lab var l1govtorebfore100_rebweak "Government-to-rebel forces (t-1, binary): 100 or above"
lab var l1govtorebfore "Government-to-rebel forces (t-1)"
* Robustness and other analyses
lab var l1rebvsgovfat20_succ "Relative fatalities (t-1): Rebel success (reb-min-gov below 20)"
lab var l1rebvsgovfat20_nofat "Relative fatalities (t-1): No battle deaths"
lab var l1nofat "No battle deaths (t-1)"
lab var rebvsgovfat20_3cat "Battelfield success (binary, reb-min-gov fat below 20)"
lab var lnrebmingovfat "Ln Rebel minus government fatalities"
lab var rebmingovfat "Rebel minus government fatalities"
lab var l1rebvsgovfat00_succ "Relative fatalities (t-1): Rebel success (reb-min-gov below 0)"
lab var l1rebvsgovfat_12cat "Battelfield success (t-1, 12-category reb-min-gov-fat)" 
lab var l1nv4 "Nonviolent tactics (t-1)"
lab var confl_year "Years in conflict"
lab var combatdum "At least one combat event (binary)"
lab var deaths_prec "Precicion: low estimate as share of high est"
lab var deaths_unknown_share "Share of deaths unknown"
lab var prec_share_a "Precision: Share of gov fatalities coded with event clarity"
lab var prec_share_b "Precision: Share of rebel fatalities coded with event clarity"
lab var dyads_actcw_ctryr "Active civil war dyads per country-year"
lab var lnl1govtorebfore "Ln Government-to-rebel forces (t-1)"
lab var rebextsupp "External support to rebels (t-1)"
lab var lnpop "Ln Population (t-1)"
lab var UrbanpopulationoftotalS "Urban population (percent) (t-1)"
lab var lngdppcusd "Ln GDP per capita (USD) (t-1)"
lab var rebmingovfat_change "Change in Rebel minus gov. fatalities"
lab var nofat "No battle deaths"
lab var govfat "Government fatalities"
lab var rebfat "Rebel fatalities"
lab var mean_l1rebvsgovfat20_succ "[Group mean] Battlefiled success (t-1, binary)"
lab var mean_l1rebvsgovfat20_nofat "[Group mean] NO battle deaths (t-1)" 
lab var mean_l1lnrebfore "[Group mean] Ln Rebel forces (t-1)"
lab var mean_l1lngovtroops "[Group mean] Ln Government forces (t-1)"
lab var mean_l1lncombatevent "[Group mean] Ln Combat events (t-1)"
lab var mean_yrs_nv4 "[Group mean] Years since nonviolence"
lab var mean_yrs_nv4_sq "[Group mean] Years since nonviolence, squared"
lab var mean_yrs_nv4_cb "[Group mean] Years since nonviolence, cubed"
* Weights, identifiers etc.
lab var weight "Sampling weights"
lab var ccode "Country id"
lab var country "Country name"
lab var region "Region name"
lab var dyad_new_id "[UCDP] Dyad id"
lab var dyad_name "[UCDP] Dyad name"
lab var conflict_new_id "[UCDP] Conflict id"
lab var conflict_name "[UCDP] Conflict name"
lab var side_a_new_id "[UCDP] Side A id"
lab var side_a "[UCDP] Side A name"
lab var side_b_new_id "[UCDP] Side B id"
lab var side_b "[UCDP] Side B name"
lab var kgcid "[SRDP] Group id"
lab var groupname "[SRDP] Group name"
lab var facid "[SRDP] Faction id"
lab var facname "[SRDP] Faction name"


*** Value labels
/*
label define rebvsgovfat_8cat 1 ">100" 2 "100to40" 3 "40to20" 4 "20to0" ///
			5 "0to-20" 6 "-20to-40" 7 "-40to-100" 8 "<-100" 99 "No fatalities"
		label values l1rebvsgovfat_8cat rebvsgovfat_8cat

label define rebvsgovfat_12cat 1 ">100" 2 "100to80" 3 "80to60" 4 "60to40" ///
			5 "40to20" 6 "20to0" 7 "0to-20" 8 "-20to-40" 9 "-40to-60" ///
			10 "-60to-80" 11 "-80to-100" 12 "<-100" 99 "No fatalities"
		label values l1rebvsgovfat_12cat rebvsgovfat_12cat 

label define rebvsgovfat20_3cat ///
			0 "Rel. fatalities: No fatalities" ///
			1 "Rel. fatalities: Rebel losses" ///
			2 "Rel. fatalities: Rebel gains"
		label values l1rebvsgovfat20_3cat rebvsgovfat20_3cat 
*/




*--------------------------------------------------------------------------	
*	Log file
*--------------------------------------------------------------------------

log using tables.log , replace




*--------------------------------------------------------------------------	
**# 1	Descriptive statistics
*--------------------------------------------------------------------------

	
*** Table A1. Dependent variable

tab protestnew 
tab econcnew 
tab socncnew 
tab nvintnew 
tab political_nocoop 
tab nv4 
															qui log close
																
*** Figure A1. Distibution of rebel minus government fatalities

hist rebmingovfat ///
		if ( rebfat>0 | govfat>0 ) ///
		, discr percent color(gs8) ///
		normal normopt(lcolor(gs14)) aspect(1) ///
		xtitle("Rebel minus government fatalities")
	graph export ".\fig_a1_rebmingov.pdf", /* as(tif)*/ replace

	
*** Figure A2. Distibution of rebel minus government fatalities, excl outliers

hist rebmingovfat ///
		if ( rebfat>0 | govfat>0 ) & inrange(rebmingovfat,-50,400 ) ///
		, discr percent color(gs8) ///
		normal normopt(lcolor(gs14)) xline(-31 354, lstyle(dash) lcol(gs10) ) ///
		xscale(range(-50 400)) xlab(-50(50)400) aspect(1) ///
		xtitle("Rebel minus government fatalities")
	graph export ".\fig_a2_rebmingov2.pdf", /* as(tif)*/ replace
	
	
*** Figure A3. Distibution of years since nonviolence
	
hist yrs_nv4  ///
		, discr percent color(gs8) ///
		normal normopt(lcolor(gs14)) aspect(1) ///
		xtitle("Years since nonviolence")
	graph export ".\fig_a3_yrsnv4.pdf", /* as(tif)*/ replace

	
										qui log using tables.log , append	
*** Table A2. Frequencies

tab l1rebvsgovfat_8cat 


	
*** Table A3. Summary statistics

sum l1lnrebmingovfat l1rebvsgovfat20_succ ///
	l1nofat l1lnrebfore l1lngovtroops l1lncombatevent yrs_nv4 ///
	selfdet l1govtorebfore100_rebweak l1wingactive  
	
			
	
	
	
*--------------------------------------------------------------------------	
**# 2	Main regression models
*--------------------------------------------------------------------------


*** Table A4. Main models (Figure 1-2)

* |M1| Continuous success variable

xtreg nv4 l1lnrebmingovfat l1nofat ///
			l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m1			
		
* |M2| Continuous success variable, controlling for strength

xtreg nv4 l1lnrebmingovfat l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m2		
		
* |M3| Categorical success variable (dummy set)

xtreg nv4 ib1.l1rebvsgovfat_8cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid) 
		est sto _m_dummies 
		
* |M4| Binary success variable (threshold 20)

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m3		
		
															qui log close
						
*** Figure 1. Continuous and binary success				[coefficient plot]

	coefplot (_m2, label("Controlling for strength") msymbol(circle) mcolor(black) ciopts(lcolor(black))) /// 
			(_m1 , label("Minimal controls") msymbol(circle) mcolor(gs10) ciopts(lcolor(gs10))) /// 
				, bylabel(A. Continuous) ///
		|| (_m3 , label("Controlling for strength") msymbol(circle) mcolor(black) ciopts(lcolor(black))) ///
				, bylabel(B. Binary) ///
		|| , drop(_cons) byopts(legend(position(6))) ///
		rename(	l1lnrebmingovfat="Ln Rebel minus gov't fatalities (t-1)" ///
				2.l1rebvsgovfat20_3cat="Rebel success (binary, t-1)" ///
				l1nofat="No fatalities (t-1)" ///
				0.l1rebvsgovfat20_3cat="No fatalities (t-1)" ///
				yrs_nv4="Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4="Years since nonviolence^2" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4="Years since nonviolence^3" ) ///
		order("Ln Rebel minus gov't fatalities (t-1)" ///
				"Rebel success (binary, t-1)" ) ///
		xline(0, lcol(gs14) lpatt(solid) ) ///
		plotregion(lcolor(black) lwidth(thin) )  ///
		xlab( , nogrid) grid(glpatt(dot) glcol(gs12))
	graph export ".\fig1_coef_cont_binary.pdf", replace

	
*** Figure 2. Dummy set									[coefficient plot]
		
	coefplot (_m_dummies, mcol(black) ciopt(lcol(black)) ) ///
		, drop(_cons 99.*  *yrs* l1lnrebfore l1lngovtroops l1lncombatevent) ///
		baselevels ///
		rename(	1.l1rebvsgovfat_8cat=">100" ///
				2.l1rebvsgovfat_8cat="100to40" ///
				3.l1rebvsgovfat_8cat="40to20" ///
				4.l1rebvsgovfat_8cat="20to0" ///
				5.l1rebvsgovfat_8cat="0to-20" ///
				6.l1rebvsgovfat_8cat="-20to-40" ///
				7.l1rebvsgovfat_8cat="-40to-100" ///
				8.l1rebvsgovfat_8cat="<-100" ) ///
		vertical  aspect(0.3) yline(0, lpatt(solid) lcol(gs10)) ///
		xline(3.5, lcol(black) lpatt(dot)) ///
		plotregion(lcolor(black) lwidth(thin) )  ///
		xlab( , nogrid) grid(glpatt(dot) glcol(white))
		graph export ".\fig2_coef_dummyset.pdf", replace


		
*** Figure A4. Years since conflict		(plotting nonlinear time specification)

xtreg nv4 ib1.l1rebvsgovfat20_3cat /*note: base outcome 1*/ ///
			l1lnrebfore l1lngovtroops l1lncombatevent  ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		margins, at(yrs_nv=( 0 (1) 14) ) ///
			level(95)			
		marginsplot, yscale(range(-.2(.2)1)) ylab(-.2(.2)1) // 5th-95th pctile
		graph export ".\fig_a4_yrs_nv4.pdf", replace					
	
	
	

*--------------------------------------------------------------------------	
**# 3	Diagnostics		
*--------------------------------------------------------------------------	

										qui log using tables.log , append			
			
*** Table A5. Diagnostics			

* |M1| Baseline (M4, Table A4)

* |M2| Regular (unclustered) SEs

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4  ///
			, fe 
		est sto _m3_nocl

* |M3| Weights

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4  ///
			[pw=weight], fe cl(dyadid)
		est sto _m3_weights

* |M4| Influence

	/*
	// In the posted dataset, these variables already exist:
	
	// creating observation number
		sort dyadiducdp year
		gen id = _n 	
	// calculating dfbetas
		reg nv4 ib1.l1rebvsgovfat20_3cat ///
					l1lnrebfore l1lngovtroops l1lncombatevent ///
					c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
					i.dyadid  ///
					/*, cl(dyadid)*/
			dfbeta 2.l1rebvsgovfat20_3cat // these are standardized by SE
	*/
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4  ///
			if inrange(_dfbeta_1,-0.05,0.05) ///
			, fe cl(dyadid)
		est sto _m3_exclinfl		
		
* |M5| Random vs. fixed effects (Mundlak test)

xtreg nv4 l1rebvsgovfat20_succ l1rebvsgovfat20_nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			, re cl(dyadid) // Note the use of RE
		est sto _m3_mund
			// Gives same results as main model specified with FE model
			// If this was not the case, something would be misspecified
test mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb
			// Chi sq test rejects the null hypothesis 
			// that the group means equal zero (p=.0000). 
			// Thus, time-invariant unobservables are related 
			// to our regressors, and fixed-effects are appropriate.
			// For RE to be appropriate all the coefficients 
			// for group (dyadid) mean vars would have to be ~0.
			
	
			
				
*--------------------------------------------------------------------------	
**# 4	Robustness
*--------------------------------------------------------------------------


*** Table A6. Logit I . Continuous and categorical success
	
* |M1| Continuous success; baseline (M2, Table A4)

* |M2| Continuous success; LPM with lagged dv

xtreg nv4 l1lnrebmingovfat l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, fe cl(dyadid)
		est sto _nvlag2	 

* |M3| Continuous success; logit with lagged dv
		
clogit nv4 l1lnrebmingovfat l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, group(dyadid)  cl(dyadid)
		est sto _logit2
				
* |M4| Categorical success; baseline (M3, Table A4)

* |M5| Categorical success; LPM with lagged dv

xtreg nv4 ib1.l1rebvsgovfat_8cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, fe cl(dyadid) 
		est sto _nvlag_dummies 

* |M6| Categorical success; logit with lagged dv
		
clogit nv4 ib1.l1rebvsgovfat_8cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, group(dyadid) cl(dyadid) 
		est sto _logit_dummies 
		
		
		
*** Table A7. Logit II. Binary success

* |M1| Binary success; baseline (M2, Table A4)

* |M2| Binary success; LPM with lagged dv

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, fe cl(dyadid)
		est sto _nvlag3		
		
* |M3| Binary success; logit with lagged dv		
		
clogit nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, group(dyadid) cl(dyadid)
		est sto _logit3		
		
* |M4| Binary success with alternative threshold; lpm with lagged dv		
		
xtreg nv4 l1rebvsgovfat00_succ l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, fe cl(dyadid)	
		est sto _nvlag0		
		
* |M5| Binary success with alternative threshold; logit with lagged dv			
		
clogit nv4 l1rebvsgovfat00_succ l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			l1nv4 ///
			, group(dyadid) cl(dyadid) 
		est sto _logit0		


*** Table A8. Other time specifications

* |M1| Calendar year dummies; continuous success

xtreg nv4 l1lnrebmingovfat l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			i.year ///
			, fe cl(dyadid)
		est sto _m2_yrs	
		
* |M2| Calendar year dummies; binary success		
		
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			i.year ///
			, fe cl(dyadid)
		est sto _m3_yrs		
		
* |M3| Years in conflict dummies; continuous success

xtreg nv4 l1lnrebmingovfat l1nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			i.confl_year ///
			, fe cl(dyadid)
		est sto _m2_yrsinconfl	

* |M4| Years in conflict dummies; binary success

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			i.confl_year ///
			, fe cl(dyadid)
		est sto _m3_yrsinconfl				
		


*** Table A9. Additional controls

* |M1| Relative strength

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			lnl1govtorebfore ///
			, fe cl(dyadid)
		est sto _m3_contr_relstrength
		
* |M2| Competitors

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			dyads_actcw_ctryr ///
			, fe cl(dyadid)
		est sto _m3_contr_frag
		
* |M3| External support

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			l1.rebextsupp ///
			, fe cl(dyadid)
		est sto _m3_contr_extsupp	
		
* |M4| Demography and economy

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			l1.lnpop l1.UrbanpopulationoftotalS l1.lngdppcusd  ///
			, fe cl(dyadid)
		est sto _m3_contr_demec

															qui log close
				
*** Figure A5. Relative strength 		(plotting nonlinear specification)

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			lnl1govtorebfore ///
			, fe cl(dyadid)	
		margins, at(lnl1govtorebfore=( -.2 (0.2) 9.6) ) ///
			level(95)
		marginsplot, xline(1.5 8.2, lcol(gs12)) // 5%, 95% 
		graph export ".\fig_a5_relstrength.pdf", replace
	
	
										qui log using tables.log , append	

*** Table A10. Combat years subsamples

* |M1| At time t

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if combatdum>0 ///
			, fe cl(dyadid)
		est sto _m3_combat
		
* |M2| At time t-1

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l1.combatdum>0 ///
			, fe cl(dyadid)
		est sto _m3_combatl1


							
*** Table A11. Uncertainty in fatalities data
	
* |M1| Controlling for unknown deaths

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			deaths_unknown_share ///
			, fe cl(dyadid)
		est sto _m3_prec_unknowndeaths
		
* |M2| Excluding least precise observations I: <70% of deaths precision-coded

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if prec_share_a>=.70 & prec_share_b>=.70 ///
			, fe cl(dyadid)
		est sto _m3_prec_eventclarity
		
* |M3| Excluding least precise observations I: low death est <80% of high est

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if deaths_prec>=70 ///
			, fe cl(dyadid)
		est sto _m3_prec_highlowest
		
															qui log close
						
*** Figure A6. More fine-grained categorical success		[coefficient plot]

xtreg nv4 ib1.l1rebvsgovfat_12cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid) // more categories --- robustness test?
		est sto dummyset2
		
	coefplot dummyset2 ///
		, drop(_cons 99.*  *yrs* l1lnrebfore l1lngovtroops l1lncombatevent) ///
		coeflab(1.l1rebvsgovfat_12cat = ">100" ///
				2.l1rebvsgovfat_12cat = "100to80" ///
				3.l1rebvsgovfat_12cat = "80to60" ///
				4.l1rebvsgovfat_12cat = "60to40" ///
				5.l1rebvsgovfat_12cat = "40to20" ///
				6.l1rebvsgovfat_12cat = "20to0" ///
				7.l1rebvsgovfat_12cat = "0to-20" ///
				8.l1rebvsgovfat_12cat = "-20to-40" ///
				9.l1rebvsgovfat_12cat = "-40to-60" ///
				10.l1rebvsgovfat_12cat = "-60to-80" ///
				11.l1rebvsgovfat_12cat = "-80to-100" ///
				12.l1rebvsgovfat_12cat = "<-100" ) ///
		vertical yscale(range(-0.2(0.1)0.3)) yline(0, lcol(gs12)) aspect(0.4) ///
		xlab(, labsize(vsmall))
		graph export ".\fig_a6_coef_12cat.pdf", replace							
			
			
			
			
						
*------------------------------------------------------------------------	
**#	5	Causality
*------------------------------------------------------------------------

										qui log using tables.log , append

*** Table A12. Unlagged (t) and lead (t+1) on success

* |M1| Unlagged and continuous success

xtreg nv4 lnrebmingovfat nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m2_l0	
		
* |M2| Unlagged and binary success		

xtreg nv4 ib1.rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m3_l0			
		
* |M3| Lead on continuous success

xtreg nv4 F1.lnrebmingovfat F1.nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m2_f1	

* |M4| Lead on binary success		
		
xtreg nv4 ib1F1.rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m3_f1		

		
				
*** Table A13. Change in fatalities

* |M1| Linear specification

xtreg nv4 ib1.l1rebvsgovfat20_3cat rebmingovfat_change ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m2_change

* |M1| Curvelinear specification

xtreg nv4 ib1.l1rebvsgovfat20_3cat c.rebmingovfat_change##c.rebmingovfat_change ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			, fe cl(dyadid)
		est sto _m2_change_sq

		
															qui log close	
*** Figure A7. Plotting change, curvelinear
	
est restore _m2_change_sq
	margins, predict(xb) at(rebmingovfat_change=( -2500 (100) 14700)) ///
				level(95)
		marginsplot, xtitle("Change in Rebel minus government fatalities (t-1 to t)")
		graph export ".\fig_a7_change.pdf", replace

		
		
*** Figure A8. Plotting 5th to 95th percentile on change variable

est restore _m2_change_sq
	margins, predict(xb) at(rebmingovfat_change=( -193 (5) 195)) ///
				level(95)
		marginsplot, ///
				yscale(range(0(0.1)0.5)) ylabel(0(0.1)0.5) ///
				xtitle("Change in Rebel minus government fatalities (t-1 to t)")
		graph export ".\fig_a8_change_x5to95.pdf", replace	
			

			
	
*--------------------------------------------------------------------------	
**# 6	Additional analyses: subsamples
*--------------------------------------------------------------------------	

										qui log using tables.log , append

*** Table A14. Testing differences across subsamples (chi sq test)

* Incompatibility subsamples

qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if selfdet!=1 
		est sto _subs_gov_test
qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if selfdet==1
		est sto _subs_sd_test
qui suest _subs_gov_test _subs_sd_test, cl(dyadid)		
test [_subs_gov_test_mean]2.l1rebvsgovfat20_3cat = [_subs_sd_test_mean]2.l1rebvsgovfat20_3cat 

* Strength subsamples
	
qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if l1govtorebfore<100
		est sto _subs_strong_test
qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if l1govtorebfore>=100
		est sto _subs_weak_test
qui suest _subs_weak_test _subs_strong_test, cl(dyadid)		
test [_subs_weak_test_mean]2.l1rebvsgovfat20_3cat = [_subs_strong_test_mean]2.l1rebvsgovfat20_3cat 

* Civilian wing subsamples

qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if l1wingactive == 1 
		est sto _subs_civw_test	
qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if l1wingactive == 0 
		est sto _subs_nocivw_test
qui suest _subs_civw_test _subs_nocivw_test, cl(dyadid)		
test [_subs_civw_test_mean]2.l1rebvsgovfat20_3cat = [_subs_nocivw_test_mean]2.l1rebvsgovfat20_3cat 

* Civilian wing subsamples, t-2

qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if l1.l1wingactive == 1 
		est sto _subs_civw_test2
qui reg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			ib692.dyadiducdp ///
			if l1.l1wingactive == 0 
		est sto _subs_nocivw_test2		
qui suest _subs_civw_test2 _subs_nocivw_test2, cl(dyadid)		
test [_subs_civw_test2_mean]2.l1rebvsgovfat20_3cat = [_subs_nocivw_test2_mean]2.l1rebvsgovfat20_3cat // p=.07



*** Table A15. Subsamples
	
* |M1| Baseline (M4, Table A4)
	
* |M2| Incompatibility subsample: government

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if selfdet!=1 ///
			, fe cl(dyadid)
		est sto _subs_gov		
		
* |M3| Incompatibility subsample: self-determination
		
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if selfdet==1 ///
			, fe cl(dyadid)
		est sto _subs_sd		
		
* |M4| Relative strength subsample: strong rebels

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l1govtorebfore<100, fe cl(dyadid) 	 
		est sto _subs_strong

* |M5| Relative strength subsample: weak rebels

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l1govtorebfore>=100, fe cl(dyadid)
		est sto _subs_weak		
		
* |M6| Civilian wing subsample: active civilian wing

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l1wingactive == 1 ///
			, fe cl(dyadid)				
		est sto _subs_civw		

* |M7| Civilian wing subsample: no active civilian wing		
		
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l1wingactive == 0 ///
			, fe cl(dyadid)				
		est sto _subs_nocivw	
		
* |M6| Civilian wing subsample: active civilian wing, t-2

xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l2.wingactive==1 ///
			, fe cl(dyadid)
		est sto _subs_civwl2		
		
* |M6| Civilian wing subsample: no active civilian wing, t-2
		
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			if l2.wingactive==0 ///
			, fe cl(dyadid)
		est sto _subs_nocivwl2	

															qui log close
						
*** Figure 3. Subsamples								[coefficient plot]

coefplot (_subs_gov _subs_sd _subs_strong _subs_weak _subs_civw _subs_nocivw , msymbol(circle) ///
									mcolor(black) ciopts(lcolor(black)) ) ///
		, xline(0, lcolor(gs14) lpatt(solid) )  ///
		keep(2.l1rebvsgovfat20_3cat) ///
		eqrename(_subs_gov=Government ///
				_subs_sd=Self-determination ///
				_subs_strong=Strong ///
				_subs_weak=Weak ///
				_subs_civw=Active ///
				_subs_nocivw="No active wing" ) ///
		asequation swapnames ///
		headings(Government = "{bf:Incompatibility}" Active = "{bf:Civilian wing}" ///
				Strong = "{bf:Relative strength}" ) ///
		plotregion(lcolor(black) lwidth(thin) ) ///
		xscale(range(-0.2 0.2)) xlab(-0.2(0.1)0.2, nogrid) grid(glpatt(dot) glcol(gs14) ) ///
		aspectratio(2)		
	graph export ".\fig3_coef_subsamples.pdf", replace	
				
				
										qui log using tables.log , append
					
*** Table A16. Independent effects of subsample variables

* |M1| Baseline; Mundlak specification

xtreg nv4 l1rebvsgovfat20_succ l1rebvsgovfat20_nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb  ///
			, re cl(dyadid) 
		est sto _mund_m3 			
		
* |M2| Incompatibility; Mundlak specification 		
		
xtreg nv4 l1rebvsgovfat20_succ l1rebvsgovfat20_nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			selfdet ///
			, re cl(dyadid) 
		est sto _mund_selfdet 		

* |M3| Relative strength; Mundlak specification 		
		
xtreg nv4 l1rebvsgovfat20_succ l1rebvsgovfat20_nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			l1govtorebfore100_rebweak ///
			, re cl(dyadid) 
		est sto _mund_strength 		
		
* |M4| Relative strength; fixed effects specification		
		
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			l1govtorebfore100_rebweak  ///
			, fe cl(dyadid) 
		est sto _indep_strength		
	
* |M5| Civilian wing; Mundlak specification 	
	
xtreg nv4 l1rebvsgovfat20_succ l1rebvsgovfat20_nofat ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			l1wingactive ///
			, re cl(dyadid) 
		est sto _mund_wing 			
		
* |M6| Civilian wing; fixed effects specification		
		
xtreg nv4 ib1.l1rebvsgovfat20_3cat ///		
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			l1wingactive ///
			, fe cl(dyadid)				
		est sto _indep_wing			


					
*** Table A17. Independent effects when success is excluded from the models

* |M1| Baseline; Mundlak specification

xtreg nv4 ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb  ///
			, re cl(dyadid) 
		est sto _mund2_m3  			

* |M2| Incompatibility; Mundlak specification 				
		
xtreg nv4  ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			selfdet ///
			, re cl(dyadid) 
		est sto _mund2_selfdet 		
		
* |M3| Relative strength; Mundlak specification 				
		
xtreg nv4  ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			l1govtorebfore100_rebweak ///
			, re cl(dyadid) 
		est sto _mund2_strength 		
		
* |M4| Relative strength; fixed effects specification				
		
xtreg nv4 ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			l1govtorebfore100_rebweak  ///
			, fe cl(dyadid) 
		est sto _indep2_strength		
		
* |M5| Civilian wing; Mundlak specification 			
		
xtreg nv4  ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			yrs_nv4 yrs_nv4_sq yrs_nv4_cb ///
			mean_l1rebvsgovfat20_succ mean_l1rebvsgovfat20_nofat ///
			mean_l1lnrebfore mean_l1lngovtroops mean_l1lncombatevent ///
			mean_yrs_nv4 mean_yrs_nv4_sq mean_yrs_nv4_cb ///
			l1wingactive ///
			, re cl(dyadid) 
		est sto _mund2_wing 			
		
* |M6| Civilian wing; fixed effects specification				
		
xtreg nv4  ///
			l1lnrebfore l1lngovtroops l1lncombatevent ///
			c.yrs_nv4##c.yrs_nv4##c.yrs_nv4 ///
			l1wingactive ///
			, fe cl(dyadid)				
		est sto _indep2_wing			



								
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
log close
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------



*--------------------------------------------------------------------------	
**#		TeX tables
*--------------------------------------------------------------------------	

	// This section creates all the tables from the online appendix 
	// (and log file) in .tex format. If you prefer to 
	// inspect the tables with the full formatting from the 
	// appendix rather than in the log file format, run this
	// code and open the tables in Overleaf (or other TeX editor).
	
	// Note: Before running the code, remove the in the */ below code
	// and create a subfolder in the project folder named 'tables_ax'.

/*

* Table A2. Frequencies

	preserve 
		contract l1rebvsgovfat_8cat
			egen percent= total(_freq)
			replace percent= (_freq/ percent)*100
			lab drop rebvsgovfat_8cat // Or below labels will not work
		estpost tabstat _freq percent, by(l1rebvsgovfat_8cat)
		restore
	esttab using "./tables_ax/tab_freq_dummies.tex", replace ///
		cells("_freq(fmt(0)) percent(fmt(1))") noobs nomtitle nonumber ///
		varlabels(1 "More than 100" ///
					2 "100 to 40" ///
					3 "40 to 20" ///
					4 "20 to 0" ///
					5 "0 to -20" ///
					6 "-20 to -40" ///
					7 "-40 to -100" ///
					8 "Less than -100" ///
					99 "No fatalities" ) ///
		drop(Total) varwidth(80) ///
		collab(Frequency Percent, lhs("Rebel minus govt fatalities")) ///
		booktabs f 
								
* Table A3. Summary statistics

	estpost tabstat ///
		l1lnrebmingovfat l1rebvsgovfat20_succ ///
		l1nofat l1lnrebfore l1lngovtroops l1lncombatevent yrs_nv4 ///
		selfdet l1govtorebfore100_rebweak l1wingactive  ///
		 ///
		, c(stat) stat(mean sd min max n)
	esttab using "./tables_ax/tab_descr.tex", replace ///
		coeflab(l1lnrebmingovfat "Ln Rebel minus government fatalities (t-1)" ///
				l1rebvsgovfat20_succ "Rebel relative success (binary; t-1)" ///
				l1govtorebfore100_rebweak "Relative rebel weakness (binary; t-1)" ///
				l1nofat "No fatalities (t-1)") ///
		refcat(l1nofat "\vspace{0.1em} \\ \emph{Controls}" ///
			selfdet "\vspace{0.1em} \\ \emph{Subsamples}", nolabel) 	///
		cells("mean(fmt(1 2 2 1 1 1 1 2 2 2 )) sd(fmt(1 2 2 1 1 1 1 2 2 2 )) min(fmt(1 0 0 1 1 1 1 0 0 0 )) max(fmt(1 0 0 1 1 1 1 0 0 0 )) count(fmt(%15.0fc))" ) /*If this does not work, use capital letters*/ ///
		nostar /*unstack*/ nonumber ///
		compress nomtitle nonote noobs gap label booktabs f ///
		collabels("Mean" "SD" "Min" "Max" "N")
		
		
* Table A4. Main models (Figure 1-2)

	foreach i in 1 2 3 _dummies  {
			est restore _m`i'
				estadd local fe="Yes"
			}
	esttab _m1 _m2 _m_dummies _m3 ///
		using ".\tables_ax\tab_main.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Cont.\\success}" ///
				"\specialcell{Cont.\\success}" ///
				"\specialcell{Categ.\\success}" ///
				"\specialcell{Binary\\success}" ) ///
		collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		rename(0.l1rebvsgovfat20_3cat l1nofat ///
				99.l1rebvsgovfat_8cat l1nofat ) ///
		order(l1lnrebmingovfat 1.l1rebvsgovfat_8cat 2.l1rebvsgovfat_8cat ///
					3.l1rebvsgovfat_8cat 4.l1rebvsgovfat_8cat ///
					5.l1rebvsgovfat_8cat 6.l1rebvsgovfat_8cat ///
					7.l1rebvsgovfat_8cat 8.l1rebvsgovfat_8cat ///
					2.l1rebvsgovfat20_3cat l1nofat l1lnrebfore l1lngovtroops) ///
		varlabels( l1lnrebmingovfat "Ln Rebel minus government fatalities (t-1)" ///
				1.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): More than 100 (ref.)" ///
				2.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): 100 to 40" ///
				3.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): 40 to 20" ///
				4.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): 20 to 0" ///
				5.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): 0 to -20" ///
				6.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): -20 to -40" ///
				7.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): -40 to -100" ///
				8.l1rebvsgovfat_8cat "Reb-min-gov fatalities (t-1): Less than -100" ///
				2.l1rebvsgovfat20_3cat "Rebel success (t-1; reb-min-gov fat. \(<\) 20)" ///
				l1nofat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )							
							
* Table A5. Diagnostics

	foreach i in m3_nocl m3_weights m3_exclinfl {
			est restore _`i'
				estadd local fe="Yes"
				estadd local re="No"
			}
	foreach i in m3_mund {
			est restore _`i'
				estadd local fe="No"
				estadd local re="Yes"
			}		
	esttab _m3 _m3_nocl _m3_weights _m3_exclinfl _m3_mund ///
		using ".\tables_ax\tab_diagnostics.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle(	"\specialcell{Baseline,\\binary\\success}" ///
				"\specialcell{Regular\\SEs}" ///
				"\specialcell{Weighted}" ///
				"\specialcell{Excluding\\influential\\obs}" ///
				"\specialcell{Mundlak\\test}" ) ///
			collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		rename(l1rebvsgovfat20_succ 2.l1rebvsgovfat20_3cat ///
				l1rebvsgovfat20_nofat 0.l1rebvsgovfat20_3cat ///
				yrs_nv4_sq c.yrs_nv4#c.yrs_nv4 ///
				yrs_nv4_cb c.yrs_nv4#c.yrs_nv4#c.yrs_nv4) ///
		order(2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels( 2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)"  ///
				mean_l1rebvsgovfat20_succ "Mean, rebel success " ///
				mean_l1rebvsgovfat20_nofat "Mean, no battle deaths" ///
				mean_l1lnrebfore "Mean, ln rebel forces" ///
				mean_l1lngovtroops "Mean, ln gov. forces" ///
				mean_l1lncombatevent "Mean, combat events" ///
				mean_yrs_nv4 "Mean, years since nonv." ///
				mean_yrs_nv4_sq "Mean, years since nonv.\(^{2}\)" ///
				mean_yrs_nv4_cb "Mean, years since nonv.\(^{3}\)" ) /// 
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )
							
* Table A6. Logit I . Continuous and categorical success

	foreach i in nvlag2 nvlag_dummies logit2 logit_dummies {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m2 _nvlag2 _logit2 _m_dummies _nvlag_dummies _logit_dummies ///
		using ".\tables_ax\tab_logit.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Cont.\\success:\\Basel.}" ///
				"\specialcell{Cont.\\success:\\Nv t-1}" ///
				"\specialcell{Cont.\\success:\\Logit}" ///
				"\specialcell{Categ.\\success:\\Basel.}" ///
				"\specialcell{Categ.\\success:\\Nv t-1}" ///
				"\specialcell{Categ.\\success:\\Logit}" ) ///
		collabels(none) drop(_cons ) ///
		rename(	99.l1rebvsgovfat_8cat l1nofat ) ///
		order(l1lnrebmingovfat 1.l1rebvsgovfat_8cat 2.l1rebvsgovfat_8cat ///
					3.l1rebvsgovfat_8cat 4.l1rebvsgovfat_8cat ///
					5.l1rebvsgovfat_8cat 6.l1rebvsgovfat_8cat ///
					7.l1rebvsgovfat_8cat 8.l1rebvsgovfat_8cat ///
					l1nofat l1lnrebfore l1lngovtroops) ///
		varlabels( l1lnrebmingovfat "Ln Rebel minus government fatalities (t-1)" ///
				1.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): More than 100" ///
				2.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): 100 to 40" ///
				3.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): 40 to 20" ///
				4.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): 20 to 0" ///
				5.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): 0 to -20" ///
				6.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): -20 to -40" ///
				7.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): -40 to -100" ///
				8.l1rebvsgovfat_8cat "Reb-min-gov fat. (t-1): Less than -100" ///
				l1nofat "No battle deaths (t-1)" ///
				l1nv4 "Nonviolence (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )	
				
* Table A7. Logit II. Binary success

	foreach i in nvlag3 logit3 logit0 nvlag0 {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m3 _nvlag3 _logit3 _nvlag0 _logit0 ///
		using ".\tables_ax\tab_logit2.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Binary\\success:\\Base-\\line}" ///
				"\specialcell{Binary\\success:\\LPM w.\\Nv t-1}" ///
				"\specialcell{Binary\\success:\\Logit w.\\Nv t-1}" ///
				"\specialcell{Alt.\\binary:\\LPM w.\\Nv t-1}" ///
				"\specialcell{Alt.\\binary:\\Logit w.\\Nv t-1}" ) ///
		collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		rename(l1rebvsgovfat00_succ 2.l1rebvsgovfat20_3cat ///
				l1nofat 0.l1rebvsgovfat20_3cat) ///
		order(2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels( 2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				l1nv4 "Nonviolence (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )
							
* Table A8. Other time specifications

	foreach i in m2_yrs m3_yrs m2_yrsinconfl m3_yrsinconfl {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m2_yrs _m3_yrs _m2_yrsinconfl _m3_yrsinconfl ///
		using ".\tables_ax\tab_alttime.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Calendar\\year\\dummies}" ///
				"\specialcell{Calendar\\year\\dummies}" ///
				"\specialcell{Yrs. in\\conflict\\dummies}" ///
				"\specialcell{Yrs. in\\conflict\\dummies}" ) ///
			collabels(none) drop(_cons *.year *.confl_year 1.l1rebvsgovfat20_3cat ) ///
		rename(l1nofat 0.l1rebvsgovfat20_3cat) ///
		order(l1lnrebmingovfat  2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels(l1lnrebmingovfat "Ln Rebel minus government fatalities (t-1)" ///
				2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )
							
* Table A9. Additional controls

	foreach i in m3_contr_relstrength m3_contr_frag m3_contr_extsupp m3_contr_demec  {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m3_contr_relstrength _m3_contr_frag _m3_contr_extsupp _m3_contr_demec ///
		using ".\tables_ax\tab_controls.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle(	"\specialcell{Relative\\strength}" ///
				"\specialcell{Compet-\\itors}" ///
				"\specialcell{External\\support}" ///
				"\specialcell{Demography\\and economy}" ) ///
			collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		order(2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels( 2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)"  ///
				lnl1govtorebfore "Ln Government-to-rebel forces (t-1)" ///
				dyads_actcw_ctryr "Active civil war dyads per country-year"  ///		
				L.rebextsupp  "External support to rebels (t-1)"  ///
				L.lnpoptot "Ln Population (t-1)" /// 
				L.UrbanpopulationoftotalS "Urban population (percent) (t-1)" ///
				L.lngdppcusd "Ln GDP per capita (USD) (t-1)" ) /// 
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )
							
* Table A10. Combat years subsamples

	foreach i in m3_combat m3_combatl1 {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m3_combat _m3_combatl1 ///
		using ".\tables_ax\tab_combatyrs.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle(	"\specialcell{Combat\\yrs, t}" ///
				"\specialcell{Combat\\yrs, t-1}" ) ///
			collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		order(2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels( 2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)"  ///
				 ) /// 
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )
													
* Table A11. Uncertainty in fatalities data

	foreach i in m3_prec_unknowndeaths m3_prec_eventclarity m3_prec_highlowest {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m3_prec_* ///
		using ".\tables_ax\tab_prec.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle(	"\specialcell{Deaths\\unknown}" ///
				"\specialcell{Event\\clarity\\subs.}" ///
				"\specialcell{Low vs.\\high est.\\subs.}" ) ///
			collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		order(2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels( 2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)"  ///
				deaths_unknown_share "Share of deaths unknown" ) /// 
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )
													
* Table A12. Unlagged (t) and lead (t+1) on success

	foreach i in m2_l0 m3_l0 m2_f1 m3_f1  {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m2_l0 _m3_l0 _m2_f1 _m3_f1  ///
		using ".\tables_ax\tab_causality.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Unlagged\\success\\(t)}" ///
				"\specialcell{Unlagged\\success\\(t)}" ///
				"\specialcell{Lead on\\success\\(t+1)}" ///
				"\specialcell{Lead on\\success\\(t+1)}" ) ///
		collabels(none) drop(_cons 1.rebvsgovfat20_3cat 1bF.rebvsgovfat20_3cat) ///
		rename(nofat 0.rebvsgovfat20_3cat ///
				F.nofat 0F.rebvsgovfat20_3cat) ///
		order(lnrebmingovfat 2.rebvsgovfat20_3cat  ///
				F.lnrebmingovfat 2F.rebvsgovfat20_3cat ///
				0.rebvsgovfat20_3cat 0F.rebvsgovfat20_3cat ) ///
		varlabels(lnrebmingovfat "Ln Rebel minus government fatalities (t)" ///
				2.rebvsgovfat20_3cat "Rebel success (t, binary)" ///
				0.rebvsgovfat20_3cat "No battle deaths (t)" ///
				F.lnrebmingovfat "Ln Rebel minus government fatalities (t+1)" ///
				2F.rebvsgovfat20_3cat "Rebel success (t+1, binary)" ///
				0F.rebvsgovfat20_3cat "No battle deaths (t+1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )	
									
* Table A13. Change in fatalities

	foreach i in m2_change m2_change_sq  {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m2_change _m2_change_sq  ///
		using ".\tables_ax\tab_change.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Linear\\change}" ///
				"\specialcell{Change\\squared}" ) ///
		collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		order(*rebmingovfat_change 2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels(rebmingovfat_change "Change in Rebel minus gov. fatalities" ///
				c.rebmingovfat_change#c.rebmingovfat_change "Change in Rebel minus gov. fatalities \(^{2}\)" ///
				2.l1rebvsgovfat20_3cat "Rebel success (t, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )							
							
* Table A15. Subsamples

	foreach i in subs_gov subs_sd subs_weak subs_strong ///
				subs_civw subs_nocivw subs_civwl2 subs_nocivwl2 {
			est restore _`i'
				estadd local fe="Yes"
			}
	esttab _m3 _subs_gov _subs_sd _subs_strong _subs_weak ///
			_subs_civw _subs_nocivw _subs_civwl2 _subs_nocivwl2 ///
		using ".\tables_ax\tab_subs.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Baseline:\\Full\\sample}" ///
				"\specialcell{Gov.\\incomp-\\atibility}" ///
				"\specialcell{Self-\\determ.\\incomp.}" ///
				"\specialcell{Strong\\rebels}" ///
				"\specialcell{Weak\\rebels}" ///
				"\specialcell{Civilian\\wing}" ///
				"\specialcell{No\\civilian\\wing}" ///
				"\specialcell{Civilian\\wing\\(t-2)}" ///
				"\specialcell{No\\civilian\\wing\\(t-2)}"  ) ///
		collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		order(2.l1rebvsgovfat20_3cat 0.l1rebvsgovfat20_3cat) ///
		varlabels( 2.l1rebvsgovfat20_3cat "Rebel success (t-1, binary)" ///
				0.l1rebvsgovfat20_3cat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{2}\)" ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 "Years since nonviolence \(^{3}\)" ) ///
		stats(N N_clust r2 aic fe, fmt(%15.0fc 0 2 0) ///
					labels("Observations" "Dyads" "R\(^{2}\) (within)" ///
							"AIC" "Fixed effects") )

* Table A16. Independent effects (of subsample variables)

	foreach i in mund_m3 mund_wing mund_selfdet mund_strength {
			est restore _`i'
				estadd local re="Yes"
			} 
	foreach i in strength wing {
			est restore _indep_`i'
				estadd local fe="Yes"
			} 
	esttab _mund_m3 _mund_selfdet _mund_strength ///
			_indep_strength _mund_wing _indep_wing  ///
		using ".\tables_ax\tab_indepeff.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Mundlak;\\Base-\\line}" ///
				"\specialcell{Mundlak;\\Incomp-\\atibility}" ///
				"\specialcell{Mundlak;\\Rel.\\strength}" ///
				"\specialcell{FEs;\\Rel.\\strength}" ///
				"\specialcell{Mundlak;\\Civ.\\wing}" ///
				"\specialcell{FEs;\\Civ.\\wing}") ///
		collabels(none) drop(_cons 1.l1rebvsgovfat20_3cat ) ///
		order(l1rebvsgovfat20_succ l1rebvsgovfat20_nofat ) ///
		rename(0.l1rebvsgovfat20_3cat l1rebvsgovfat20_nofat ///
				2.l1rebvsgovfat20_3cat l1rebvsgovfat20_succ ///
				c.yrs_nv4#c.yrs_nv4 yrs_nv4_sq ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 yrs_nv4_cb  ) ///
		varlabels( l1rebvsgovfat20_succ "Rebel success (t-1, binary)" ///
				l1rebvsgovfat20_nofat "No battle deaths (t-1)" ///
				yrs_nv4 "Years since nonviolence" ///
				yrs_nv4_sq "Years since nonviolence \(^{2}\)" ///
				yrs_nv4_cb "Years since nonviolence \(^{3}\)" ///
				mean_l1rebvsgovfat20_succ "Mean, rebel success " ///
				mean_l1rebvsgovfat20_nofat "Mean, no battle deaths" ///
				mean_l1lnrebfore "Mean, ln rebel forces" ///
				mean_l1lngovtroops "Mean, ln gov. forces" ///
				mean_l1lncombatevent "Mean, combat events" ///
				mean_yrs_nv4 "Mean, years since nonv." ///
				mean_yrs_nv4_sq "Mean, years since nonv.\(^{2}\)" ///
				mean_yrs_nv4_cb "Mean, years since nonv.\(^{3}\)" ///
				l1govtorebfore100_rebweak "Weak rebels (t-1, binary)") ///
		stats(N re fe, fmt(%15.0fc 0 ) ///
					labels("Observations" "Random intercept" "Fixed effects") )

* Table A17. Independent effects when success is excluded from the models

	foreach i in mund2_m3 mund2_wing mund2_selfdet mund2_strength {
			est restore _`i'
				estadd local re="Yes"
			} 
	foreach i in strength wing {
			est restore _indep2_`i'
				estadd local fe="Yes"
			} 
	esttab _mund2_m3 _mund2_selfdet _mund2_strength ///
			_indep2_strength _mund2_wing _indep2_wing  ///
		using ".\tables_ax\tab_indepeff_nosucc.tex" ///
		, replace fragment booktabs label ///
		star("$^\dagger$" 0.10 * 0.05 ** 0.01 *** 0.001) ///
		cells("b(fmt(3)star)" "se(fmt(3)par)") ///
		alignment(D{.}{.}{-1}) ///
		mtitle("\specialcell{Mundlak;\\Base-\\line}" ///
				"\specialcell{Mundlak;\\Incomp-\\atibility}" ///
				"\specialcell{Mundlak;\\Rel.\\strength}" ///
				"\specialcell{FEs;\\Rel.\\strength}" ///
				"\specialcell{Mundlak;\\Civ.\\wing}" ///
				"\specialcell{FEs;\\Civ.\\wing}") ///
		collabels(none) drop(_cons  ) ///
		rename(0.l1rebvsgovfat20_3cat l1rebvsgovfat20_nofat ///
				2.l1rebvsgovfat20_3cat l1rebvsgovfat20_succ ///
				c.yrs_nv4#c.yrs_nv4 yrs_nv4_sq ///
				c.yrs_nv4#c.yrs_nv4#c.yrs_nv4 yrs_nv4_cb  ) ///
		varlabels( ///
				yrs_nv4 "Years since nonviolence" ///
				yrs_nv4_sq "Years since nonviolence \(^{2}\)" ///
				yrs_nv4_cb "Years since nonviolence \(^{3}\)" ///
				mean_l1rebvsgovfat20_succ "Mean, rebel success " ///
				mean_l1rebvsgovfat20_nofat "Mean, no battle deaths" ///
				mean_l1lnrebfore "Mean, ln rebel forces" ///
				mean_l1lngovtroops "Mean, ln gov. forces" ///
				mean_l1lncombatevent "Mean, combat events" ///
				mean_yrs_nv4 "Mean, years since nonv." ///
				mean_yrs_nv4_sq "Mean, years since nonv.\(^{2}\)" ///
				mean_yrs_nv4_cb "Mean, years since nonv.\(^{3}\)" ///
				l1govtorebfore100_rebweak "Weak rebels (t-1, binary)") ///
		stats(N re fe, fmt(%15.0fc 0 ) ///
					labels("Observations" "Random intercept" "Fixed effects") )


*/



*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
**#	End of article syntax
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------






